package com.dha.ultility;

import com.dha.caodangcongnghe.R;
import com.dha.variable.ThongTinTaiKhoan;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.AdView;

import android.app.Activity;
import android.content.Context;
import android.widget.LinearLayout;

public class QuangCao {
	private Context context;
	private Activity activity;
	public AdView adView;
	public QuangCao(Context context, Activity activity) {
		super();
		this.context = context;
		this.activity = activity;
		
		adView = new AdView(context);
		adView.setAdSize(AdSize.BANNER);
		adView.setAdUnitId(ThongTinTaiKhoan.ID);
		
		
		LinearLayout linearLayout = (LinearLayout) activity.findViewById(R.id.layout_QuangCao);
		linearLayout.addView(adView);
		
		AdRequest adRequest = new AdRequest.Builder().build();
		
		adView.loadAd(adRequest);
	}
	
	
	
}
